/**
 * visitor.h is part of cbs-framework.
 *
 * cbs-framework is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * cbs-framework is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with cbs-framework.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef VISITOR_H
#define VISITOR_H

// Forward declarations.
class Model;
class TaskTimeWindowConstraint;
class TaskLenghtConstraint;
class TaskResourcesNeededConstraint;
class ResourceCapacityConstraint;
class ModelAllowIdlesConstraint;
class ModelMaxTimeConstraint;
class ModelPrecedenceConstraint;
class Task;
class Resource;

class Visitor
{
public:

    virtual ~Visitor() {}

    // Visit methods go here as:
    // virtual void Visit( <type> * );

    // Visit model.
    virtual void Visit( Model * a_model );

    // Visit constraints.
    virtual void Visit( TaskTimeWindowConstraint * a_constraint );
    virtual void Visit( TaskLenghtConstraint * a_constraint );
    virtual void Visit( TaskResourcesNeededConstraint * a_constraint );

    virtual void Visit( ResourceCapacityConstraint * a_constraint );

    virtual void Visit( ModelAllowIdlesConstraint * a_constraint );
    virtual void Visit( ModelMaxTimeConstraint * a_constraint );
    virtual void Visit( ModelPrecedenceConstraint * a_constraint );

    // Visit tasks and resources.
    virtual void Visit( Task * a_task );
    virtual void Visit( Resource * a_resource );

protected:

    Visitor() {}

private:

    // Protect default copy constructor.
    Visitor( const Visitor & a_other );

    // Protect default operator =.
    Visitor & operator = ( const Visitor & a_other );

};

#endif // VISITOR_H
